import VueRouter from 'vue-router'

// import Home from './components/tabbar/home.vue'
// import News from './components/tabbar/news.vue'
// import Me from './components/tabbar/me.vue'
// import ShopList from './components/shopList/shopList.vue'
// import Detaile from './components/details/details.vue'
// import Setting from './components/tabbar/setting.vue'
import Home from './components/tabbar/home.vue'
import News from './components/tabbar/news.vue'
import Me from './components/tabbar/me.vue'
import ShopList from './components/shopList/shopList.vue'
import Detaile from './components/details/details.vue'

// 3. 创建路由对象
var router = new VueRouter({
  // routes: [
  //    { path: '/',redirect:'/home' },
  //    { path: '/home',component : Home},
  //    { path: '/news',component : News},
  //    { path: '/Me',component : Me},
  //    { path: '/shopList/:id',component : ShopList},
  //    { path: '/shopList/:shopId/details/:id',component : Detaile }
  // ],
  routes: [
    { path: '/',redirect:'/home' },
    { path: '/home',component: Home },
    { path: '/news',component: News },
    { path: '/Me',component : Me },
    { path: '/shopList/:id',component : ShopList},
     { path: '/shopList/:shopId/details/:id',component : Detaile }
  ],
  linkActiveClass: 'mui-active'
})

// 把路由对象暴露出去
export default router